<template>
	<view class="home">
		<Navbar/>
		<!-- <view class="index_banner_box">
			<swiper class="swiper" :indicator-dots="true" :autoplay="true" :interval="5000" :duration="1000">
				<swiper-item v-for="(item,index) in topBanner" :key="index">
					<image class="banner" :src="item.img_url">
					</image>
				</swiper-item>
			</swiper>
		</view> -->
		<Richtext/>
	</view>
</template>
<script>
	import Navbar from "../../components/navbar.vue"
	import Richtext from "../../components/richtest.vue"
	export default {
		data() {
			return {
				topBanner:[]
			}
		},
		onLoad() {

		},
		mounted(){
			uni.request({
				url:"http://html5.bjsxt.cn/api/index/banner",
				//<img class="currentImg" id="currentImg" onload="alog &amp;&amp; alog('speed.set', 'c_firstPageComplete', +new Date); alog.fire &amp;&amp; alog.fire('mark');" src="https://img1.baidu.com/it/u=3291018791,19249202&amp;fm=253&amp;fmt=auto&amp;app=138&amp;f=JPEG?w=353&amp;h=499" style="top: 0px; left: 210px; width: 460.071px; height: 651px; cursor: pointer;" log-rightclick="p=5.102" title="点击查看图片来源" width="321.55477031802" height="455">
				success:(res) => {
					this.topBanner = res.data.top_banner
				}
			})
		},
		components:{
			Navbar,
			Richtext
		},
	}
</script>

<style lang="scss">
	.home{
		display: flex;
		flex-direction: column;
		flex: 1;
		overflow: hidden;
		.index_banner_box{
			display: flex;
			width: 100%;
			padding: 10px;
			justify-content: center;
			align-item: ceneter;
			border-radius: 5px;
			overflow: hidden;
			.swiper{
				width: 100%;
				height: 200px;
				.banner{
					width: 700rpx;
					height: 260rpx;
				}
			}
		}
	}
</style>